//package io.renren;
//
//import java.util.List;
//
//import org.springframework.boot.ApplicationArguments;
//import org.springframework.boot.ApplicationRunner;
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//
//import io.renren.wx.mp.config.WxMpConfiguration;
//import lombok.extern.slf4j.Slf4j;
//import me.chanjar.weixin.common.error.WxErrorException;
//import me.chanjar.weixin.mp.api.WxMpService;
//import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;
//import me.chanjar.weixin.mp.bean.result.WxMpUser;
//import me.chanjar.weixin.mp.bean.result.WxMpUserList;
//
///**
// * 系统启动执行
// */
//@Slf4j
//@Component // 被spring容器管理
//@Order(1) // 如果多个自定义ApplicationRunner，用来标明执行顺序
//public class SystemStartRunner implements ApplicationRunner {
//	@Override
//	public void run(ApplicationArguments applicationArguments) throws Exception {
//		
//		WxMpService mpService = WxMpConfiguration.getMpServices().get("wx7a917b3b518e0deb");
//        WxMpUserList wxMpUserList = mpService.getUserService().userList(null);
//        List<String> openids = wxMpUserList.getOpenids();
//        wxMpUserList.getOpenids().forEach(openid->{
////        	System.out.println("关注:"+openid);
//        	try {
//        		//
//        		if("oe_JntwiUmBio_kapVlLd_7jOWCY".equals(openid)) {
//        			WxMpUser userInfo = mpService.getUserService().userInfo(openid);
//    				System.out.println("用户:"+userInfo);	
//        		}
//				
//			} catch (WxErrorException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//        });
//        WxMpKefuMessage msg = WxMpKefuMessage.TEXT().toUser("oe_JntwiUmBio_kapVlLd_7jOWCY").content("测试信息").build();
//        
////        boolean sendKefuMessage = mpService.getKefuService().sendKefuMessage(msg);
////        System.out.println("发送:"+sendKefuMessage);
////        List<WxMpUser> userInfoList = mpService.getUserService().userInfoList(wxMpUserList.getOpenids());
////        userInfoList.forEach(user->{
////        	System.out.println("用户:"+user);
////        });
//	}
//}